/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * frmPemeriksaanPelayanan.java
 *
 * Created on Jan 24, 2012, 3:57:00 PM
 */
package SIMRS.RawatInap.view;

import SIMRS.RawatInap.sql.koneksiDatabase;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.Date;
import usu.widget.Form;

/**
 *
 * @author asus A42J-i3
 */
public class frmTransaksiPelayanan extends Form {
Connection koneksi=koneksiDatabase.getKoneksi();
    /** Creates new form frmPemeriksaanPelayanan */
    public frmTransaksiPelayanan() {
        initComponents();
        
         cmbJenisPasien.addItem("");
        try{
         Statement stm = koneksi.createStatement();
         ResultSet rs = stm.executeQuery("select * from jenispasien order by JenisPasien asc");
         rs.beforeFirst();
         while(rs.next()){
             cmbJenisPasien.addItem(rs.getString("JenisPasien"));
         }
         rs.close();
     }
     catch(SQLException ex)
     {
         System.out.println("Error : "+ex);
         }

    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jFrame1 = new javax.swing.JFrame();
        pnlForm1 = new SIMRS.RawatInap.widget.PnlForm();
        btnKeluar = new SIMRS.RawatInap.widget.button2();
        label13 = new SIMRS.RawatInap.widget.Label();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel1 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        tblInformasiPelayanan = new SIMRS.RawatInap.widget.Table();
        btnBatalInfoPelayanan = new SIMRS.RawatInap.widget.button2();
        btnTambahInfoPelayanan = new SIMRS.RawatInap.widget.button2();
        jPanel2 = new javax.swing.JPanel();
        jScrollPane2 = new javax.swing.JScrollPane();
        tblInformasiObat = new SIMRS.RawatInap.widget.Table();
        btnTambahObat = new SIMRS.RawatInap.widget.button2();
        btnBatalObat = new SIMRS.RawatInap.widget.button2();
        jPanel3 = new javax.swing.JPanel();
        jScrollPane3 = new javax.swing.JScrollPane();
        tblInformasiDiagnosa = new SIMRS.RawatInap.widget.Table();
        btnTambahDiagnosa = new SIMRS.RawatInap.widget.button2();
        btnBatalDiagnosa = new SIMRS.RawatInap.widget.button2();
        jPanel4 = new javax.swing.JPanel();
        btnTambahPesanPelayanan = new SIMRS.RawatInap.widget.button2();
        btnBatalPesanPelayanan = new SIMRS.RawatInap.widget.button2();
        jScrollPane4 = new javax.swing.JScrollPane();
        tblPemesananPelayanan = new SIMRS.RawatInap.widget.Table();
        jPanel5 = new javax.swing.JPanel();
        txtNoRM = new SIMRS.RawatInap.widget.TextBox();
        label8 = new SIMRS.RawatInap.widget.Label();
        label6 = new SIMRS.RawatInap.widget.Label();
        label2 = new SIMRS.RawatInap.widget.Label();
        txtNama = new SIMRS.RawatInap.widget.TextBox();
        label9 = new SIMRS.RawatInap.widget.Label();
        label5 = new SIMRS.RawatInap.widget.Label();
        txtUmur = new SIMRS.RawatInap.widget.TextBox();
        label7 = new SIMRS.RawatInap.widget.Label();
        txtNoRegistrasi = new SIMRS.RawatInap.widget.TextBox();
        cmbJenisPasien = new javax.swing.JComboBox();
        txtTanggalMasuk = new com.toedter.calendar.JDateChooser();
        kdJenisPasien = new javax.swing.JTextField();

        setUndecorated(true);
        getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        pnlForm1.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(112, 138, 31), 3, true));
        pnlForm1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        btnKeluar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/SIMRS/RawatInap/gambar/bt_close.png"))); // NOI18N
        btnKeluar.setText("Keluar");
        btnKeluar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnKeluarActionPerformed(evt);
            }
        });
        pnlForm1.add(btnKeluar, new org.netbeans.lib.awtextra.AbsoluteConstraints(510, 520, -1, -1));

        label13.setForeground(new java.awt.Color(255, 255, 255));
        label13.setText("Form Pemesanan Pelayanan");
        label13.setFont(new java.awt.Font("Tahoma", 1, 24));
        pnlForm1.add(label13, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 30, -1, -1));

        tblInformasiPelayanan.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jScrollPane1.setViewportView(tblInformasiPelayanan);

        btnBatalInfoPelayanan.setIcon(new javax.swing.ImageIcon(getClass().getResource("/SIMRS/RawatInap/gambar/bt_batal.png"))); // NOI18N
        btnBatalInfoPelayanan.setText("Batal");

        btnTambahInfoPelayanan.setIcon(new javax.swing.ImageIcon(getClass().getResource("/SIMRS/RawatInap/gambar/bt_tambah.png"))); // NOI18N
        btnTambahInfoPelayanan.setText("Tambah");
        btnTambahInfoPelayanan.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnTambahInfoPelayananActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 565, Short.MAX_VALUE)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(btnTambahInfoPelayanan, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(13, 13, 13)
                        .addComponent(btnBatalInfoPelayanan, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 161, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnTambahInfoPelayanan, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnBatalInfoPelayanan, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("Informasi Pelayanan", jPanel1);

        tblInformasiObat.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jScrollPane2.setViewportView(tblInformasiObat);

        btnTambahObat.setIcon(new javax.swing.ImageIcon(getClass().getResource("/SIMRS/RawatInap/gambar/bt_tambah.png"))); // NOI18N
        btnTambahObat.setText("Tambah");
        btnTambahObat.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnTambahObatActionPerformed(evt);
            }
        });

        btnBatalObat.setIcon(new javax.swing.ImageIcon(getClass().getResource("/SIMRS/RawatInap/gambar/bt_batal.png"))); // NOI18N
        btnBatalObat.setText("Batal");

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 565, Short.MAX_VALUE)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(btnTambahObat, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(13, 13, 13)
                        .addComponent(btnBatalObat, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 163, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnTambahObat, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnBatalObat, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(4, 4, 4))
        );

        jTabbedPane1.addTab("Informasi Pemakaian Obat", jPanel2);

        tblInformasiDiagnosa.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jScrollPane3.setViewportView(tblInformasiDiagnosa);

        btnTambahDiagnosa.setIcon(new javax.swing.ImageIcon(getClass().getResource("/SIMRS/RawatInap/gambar/bt_tambah.png"))); // NOI18N
        btnTambahDiagnosa.setText("Tambah");
        btnTambahDiagnosa.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnTambahDiagnosaActionPerformed(evt);
            }
        });

        btnBatalDiagnosa.setIcon(new javax.swing.ImageIcon(getClass().getResource("/SIMRS/RawatInap/gambar/bt_batal.png"))); // NOI18N
        btnBatalDiagnosa.setText("Batal");

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 565, Short.MAX_VALUE)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addComponent(btnTambahDiagnosa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(13, 13, 13)
                        .addComponent(btnBatalDiagnosa, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnTambahDiagnosa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnBatalDiagnosa, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("Informasi Diagnosa", jPanel3);

        btnTambahPesanPelayanan.setIcon(new javax.swing.ImageIcon(getClass().getResource("/SIMRS/RawatInap/gambar/bt_tambah.png"))); // NOI18N
        btnTambahPesanPelayanan.setText("Tambah");
        btnTambahPesanPelayanan.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnTambahPesanPelayananActionPerformed(evt);
            }
        });

        btnBatalPesanPelayanan.setIcon(new javax.swing.ImageIcon(getClass().getResource("/SIMRS/RawatInap/gambar/bt_batal.png"))); // NOI18N
        btnBatalPesanPelayanan.setText("Batal");

        tblPemesananPelayanan.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jScrollPane4.setViewportView(tblPemesananPelayanan);

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 565, Short.MAX_VALUE)
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addComponent(btnTambahPesanPelayanan, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(13, 13, 13)
                        .addComponent(btnBatalPesanPelayanan, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 163, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnTambahPesanPelayanan, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnBatalPesanPelayanan, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(4, 4, 4))
        );

        jTabbedPane1.addTab("Informasi Pemesanan Pelayanan", jPanel4);

        pnlForm1.add(jTabbedPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 260, 590, 250));

        jPanel5.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(112, 138, 31), 2, true));
        jPanel5.setOpaque(false);
        jPanel5.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        txtNoRM.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtNoRMActionPerformed(evt);
            }
        });
        jPanel5.add(txtNoRM, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 40, 154, -1));

        label8.setText("Nama");
        jPanel5.add(label8, new org.netbeans.lib.awtextra.AbsoluteConstraints(330, 0, -1, 30));

        label6.setText("Umur");
        jPanel5.add(label6, new org.netbeans.lib.awtextra.AbsoluteConstraints(330, 40, -1, 20));

        label2.setText("Jenis Pasien");
        jPanel5.add(label2, new org.netbeans.lib.awtextra.AbsoluteConstraints(330, 80, -1, 20));

        txtNama.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtNamaActionPerformed(evt);
            }
        });
        jPanel5.add(txtNama, new org.netbeans.lib.awtextra.AbsoluteConstraints(395, 5, 190, -1));

        label9.setText("Tanggal Masuk");
        jPanel5.add(label9, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 70, -1, 20));

        label5.setText("No Registrasi");
        jPanel5.add(label5, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 20, -1, -1));

        txtUmur.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtUmurActionPerformed(evt);
            }
        });
        jPanel5.add(txtUmur, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 40, 60, -1));

        label7.setText("No. RM");
        jPanel5.add(label7, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 40, -1, 30));
        jPanel5.add(txtNoRegistrasi, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 10, 150, -1));

        cmbJenisPasien.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmbJenisPasienActionPerformed(evt);
            }
        });
        jPanel5.add(cmbJenisPasien, new org.netbeans.lib.awtextra.AbsoluteConstraints(410, 80, 160, -1));
        jPanel5.add(txtTanggalMasuk, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 70, 150, -1));

        kdJenisPasien.setForeground(new java.awt.Color(255, 255, 51));
        kdJenisPasien.setBorder(null);
        kdJenisPasien.setFocusable(false);
        kdJenisPasien.setOpaque(false);
        jPanel5.add(kdJenisPasien, new org.netbeans.lib.awtextra.AbsoluteConstraints(420, 100, 110, -1));

        pnlForm1.add(jPanel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 130, 590, 130));

        getContentPane().add(pnlForm1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 620, 560));

        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        setBounds((screenSize.width-621)/2, (screenSize.height-560)/2, 621, 560);
    }// </editor-fold>//GEN-END:initComponents

private void txtNoRMActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtNoRMActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_txtNoRMActionPerformed

private void txtNamaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtNamaActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_txtNamaActionPerformed

private void txtUmurActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtUmurActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_txtUmurActionPerformed

    private void btnKeluarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnKeluarActionPerformed
    dispose();
    frmPasienRawatInap pasienInap=new frmPasienRawatInap();
    pasienInap.setVisible(true);
    }//GEN-LAST:event_btnKeluarActionPerformed

private void btnTambahInfoPelayananActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnTambahInfoPelayananActionPerformed
    
    input();
    this.dispose();
}//GEN-LAST:event_btnTambahInfoPelayananActionPerformed

private void btnTambahObatActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnTambahObatActionPerformed
    this.dispose();
    frmObat obat=new frmObat();
    obat.setVisible(true);
}//GEN-LAST:event_btnTambahObatActionPerformed

private void btnTambahDiagnosaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnTambahDiagnosaActionPerformed
    this.dispose();
    frmDiagnosa diagnosa=new frmDiagnosa();
    diagnosa.setVisible(true);
}//GEN-LAST:event_btnTambahDiagnosaActionPerformed

private void btnTambahPesanPelayananActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnTambahPesanPelayananActionPerformed
    this.dispose();
    frmPemesananPelayanan pemesananPelayanan=new frmPemesananPelayanan();
    pemesananPelayanan.setVisible(true);
}//GEN-LAST:event_btnTambahPesanPelayananActionPerformed

private void cmbJenisPasienActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmbJenisPasienActionPerformed
// TODO add your handling code here:
    try{
         Statement stm = koneksi.createStatement();
         ResultSet rs = stm.executeQuery("select KdJenisPasien from jenispasien where JenisPasien= '"+cmbJenisPasien.getSelectedItem().toString()+"'");
         rs.beforeFirst();
         while(rs.next()){
             kdJenisPasien.setText(rs.getString(1).trim());
         }
         rs.close();
         }
         catch(SQLException ex)
         {
             System.out.println("Error : "+ex);
             }
}//GEN-LAST:event_cmbJenisPasienActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private SIMRS.RawatInap.widget.button2 btnBatalDiagnosa;
    private SIMRS.RawatInap.widget.button2 btnBatalInfoPelayanan;
    private SIMRS.RawatInap.widget.button2 btnBatalObat;
    private SIMRS.RawatInap.widget.button2 btnBatalPesanPelayanan;
    private SIMRS.RawatInap.widget.button2 btnKeluar;
    private SIMRS.RawatInap.widget.button2 btnTambahDiagnosa;
    private SIMRS.RawatInap.widget.button2 btnTambahInfoPelayanan;
    private SIMRS.RawatInap.widget.button2 btnTambahObat;
    private SIMRS.RawatInap.widget.button2 btnTambahPesanPelayanan;
    private javax.swing.JComboBox cmbJenisPasien;
    private javax.swing.JFrame jFrame1;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JTextField kdJenisPasien;
    private SIMRS.RawatInap.widget.Label label13;
    private SIMRS.RawatInap.widget.Label label2;
    private SIMRS.RawatInap.widget.Label label5;
    private SIMRS.RawatInap.widget.Label label6;
    private SIMRS.RawatInap.widget.Label label7;
    private SIMRS.RawatInap.widget.Label label8;
    private SIMRS.RawatInap.widget.Label label9;
    private SIMRS.RawatInap.widget.PnlForm pnlForm1;
    private SIMRS.RawatInap.widget.Table tblInformasiDiagnosa;
    private SIMRS.RawatInap.widget.Table tblInformasiObat;
    private SIMRS.RawatInap.widget.Table tblInformasiPelayanan;
    private SIMRS.RawatInap.widget.Table tblPemesananPelayanan;
    private SIMRS.RawatInap.widget.TextBox txtNama;
    private SIMRS.RawatInap.widget.TextBox txtNoRM;
    private SIMRS.RawatInap.widget.TextBox txtNoRegistrasi;
    private com.toedter.calendar.JDateChooser txtTanggalMasuk;
    private SIMRS.RawatInap.widget.TextBox txtUmur;
    // End of variables declaration//GEN-END:variables

public void input() {
   String noReg= txtNoRegistrasi.getText();
   String noRM= txtNoRM.getText();
   String pasien= txtNama.getText();
   String jenisPas=cmbJenisPasien.getSelectedItem().toString();
   
    frmPemeriksaan form= new frmPemeriksaan();
   form.isiText(noReg, noRM, pasien, jenisPas);
    form.setVisible(true);
}
    
    public void isiText(String noReg, String noRM, String pasien, Date a){
  
  txtNoRegistrasi.setText(noReg);
  txtNoRM.setText(noRM);
  txtNama.setText(pasien);
  txtTanggalMasuk.setDate(a);

  
}
}
